﻿package bakudo.engines.mapEngine.view.scene.actors 
{
	import bakudo.engines.mapEngine.view.scene.actors.SceneActor;
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.Graphics;
	
	/**
	 * ...
	 * @author Bakudo
	 */
	public class DefaultFloorTile extends SceneActor
	{
		public static var color : uint;
		
		public function DefaultFloorTile() 
		{
			super();
			
			
		}
		
		

		override public function getView():Bitmap 
		{
			color++;
			if(color == 3){
				color = 0;
			}
			var g : Graphics = graphics;
			var coll : Array = [0xFF0000,0x00FF00,0x00FF00]
			g.lineStyle(1, 0xFFFFFF);
			g.beginFill(coll[color], 1);
			g.drawRect(0, 0, sizeW, sizeH);
			g.endFill();
			
			var bd : BitmapData = new BitmapData(width, height);
			bd.draw(this);
			return new Bitmap(bd);
		}
		
		override public function get removeable():Boolean { 
			return true; 
		}
		
	}

}